<?php

/**
 * Created by PhpStorm.
 * User: Yieong
 * Date: 16/4/5
 * Time: 下午5:39
 */
class AccountController extends AdminBaseController {

    public function index(){
        $this->setTitle('账号信息查询');

        $server = $this->R('server');
        $search = $this->R('search');

        $serverList = ServerService::getOptions();
        if(empty($server)){
            $server = key($serverList);
        }

        $this->out['serverList'] = $serverList;

        if(!empty($search)){
            $this->out['info'] = AccountService::getInfo($server, $search);

            $this->out['server'] = $server;
            $this->out['search'] = $search;
        }
    }



}